<?php

class SweetBaseGenerator
{
	/**
	 * Test suite to perform operations upon.
	 *
	 * @var SweetTestSuite
	 */
	protected $sweetTestSuite;
	
	/**
	 * Constructor
	 *
	 * @param SweetTestSuite $suite
	 */
	public function __construct(SweetTestSuite $suite)
	{	
		$this->sweetTestSuite = $suite;
	}
	
	/**
	 * Generates an string for the Suite
	 *
	 * @return string
	 */
	public function generate()
	{	
		return $this->sweetTestSuite->__toString();
	}

	/**
	 * Create an XML file for Suite
	 *
	 * @param string $path
	 */
	public function createFile($path)
	{
		file_put_contents($path,$this->generate());
	}
}
?>